package com.aabte.commons.errorcodetest;

import com.aabte.commons.errorcode.BusinessExceptionAssert;
import lombok.ToString;
import org.springframework.http.HttpStatus;

@ToString
public enum UserCodeEnum implements BusinessExceptionAssert {
  /**
   * Bad user type
   */
  BAD_USER_TYPE(HttpStatus.BAD_REQUEST.value(), 7001, "Bad user type."),
  /**
   * User not found
   */
  USER_NOT_FOUND(HttpStatus.NOT_FOUND.value(), 7002, "User not found.");

  int status;
  int code;
  String message;

  UserCodeEnum(int status, int code, String message) {
    this.status = status;
    this.code = code;
    this.message = message;
  }

  @Override
  public int status() {
    return status;
  }

  @Override
  public int code() {
    return code;
  }

  @Override
  public String message() {
    return message;
  }

}
